package com.itboye.ihomebank.activity.me;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.activity.finance.HuanKuanActivity;
import com.itboye.ihomebank.activity.finance.JieKuanRecordActivity;
import com.itboye.ihomebank.base.BaseOtherActivity;
import com.itboye.ihomebank.base.MyApplcation;


/**
 * A login screen that offers login via email/password.
 */
public class HuanKuanResult extends BaseOtherActivity {


    ImageView img_back;
    MyApplcation myApp;
    TextView txt_title;

    @Override
    protected int layout_id() {
        return R.layout.activity_huan_kuan_two;
    }

    @Override
    protected void onInitController() {

    }

    @Override
    protected void onInit() {
        txt_title.setText("还款成功");
        myApp = (MyApplcation) getApplication();
        myApp.jieKuanRecordUI.refreshList();
        myApp.huanKuanUI.refreshData();
    }

    @Override
    protected void onReadIntent(Bundle bundle) {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.img_back:
                if (myApp.jieKuanRecordUI.totalCount == 0) {
                    startActivity(new Intent(this, HuanKuanActivity.class));
                } else {
                    startActivity(new Intent(this, JieKuanRecordActivity.class));
                }
                finish();
                break;
        }
    }
}

